<?php
namespace app\api\controller;

use\think\Controller;

class Base extends Controller
{

    protected $middleware  = [
        'CORS'
    ];

    public function jsonResponse($code,$msg,$data='')
    {
        $rs=[
            'code'=>$code,
            'msg'=>$msg,
            'data'=>$data
        ];
        return json_encode($rs,true);
    }
}
?>